home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 41 / Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso / -seriously_amiga- / programming / other / flexcat / lib / aztecas_asm.sd < prev    next >
Text File  |  1999-04-19  |  2KB  |  112 lines

  1. ##stringtype assembler
  2. ##shortstrings
  3. *****************************************************************
  4. *   This file was created automatically by `%fv'
  5. *   from "%f0".
  6. *
  7. *   Do NOT edit by hand!
  8. *****************************************************************
  9.  
  10. *   Includefiles
  11.     include "exec/types.i"
  12.     include "utility/tagitem.i"
  13.     include "libraries/locale.i"
  14.  
  15. *   Function declarations
  16.     xdef    Open%bCatalog
  17.     xdef    Close%bCatalog
  18.     xdef    Get%bString
  19.  
  20. *   Referenced data
  21.     xref    _LocaleBase
  22.  
  23. *   Referenced functions
  24.     xref    _LVOOpenCatalogA
  25.     xref    _LVOCloseCatalog
  26.     xref    _LVOGetCatalogStr
  27.  
  28. *   Data definitions
  29.     dseg
  30. OpenCatalogTags:
  31.     even
  32.     dc.l    OC_Language,0
  33.     dc.l    OC_BuiltInLanguage,%b_BuiltInLanguage
  34.     dc.l    OC_Version,%v
  35.     dc.l    TAG_DONE,0
  36.  
  37.     bss.l    %b_Catalog,4
  38.  
  39. %b_BuiltInLanguage:
  40.     %l,0
  41.  
  42. CatalogName:
  43.     dc.b    '%b.catalog',0
  44.  
  45. \teven\n\txdef\t%i\n%i:\tdc.l\t%d\n\t%s,0
  46.  
  47.  
  48. *   Code definitions
  49.     cseg
  50.  
  51. Open%bCatalog:
  52. *   a0 = Locale
  53. *   a1 = Language
  54.     movem.l a2/a6,-(sp)             ;   Save Regs
  55.  
  56.     lea    OpenCatalogTags,a2    ;   Store Language
  57.     move.l    a1,4(a2)
  58.     bne    Open%bCatalog1
  59.     lea    8(a2),a2
  60. Open%bCatalog1:
  61.     move.l    _LocaleBase,a6        ;   Call locale.OpenCatalog
  62.     move.l    a6,d0            ;   Locale opened?
  63.     beq    Open%bCatalogEnd    ;   No, skip
  64.     tst.l    %b_Catalog        ;   Catalog opened?
  65.     bne    Open%bCatalogEnd    ;   Yes, skip
  66.     lea    CatalogName,a1
  67.     jsr    _LVOOpenCatalogA(a6)
  68.     move.l    d0,%b_Catalog
  69. Open%bCatalogEnd:
  70.     movem.l (sp)+,a2/a6
  71.     rts
  72.  
  73.  
  74. Close%bCatalog:
  75.     move.l    a6,-(sp)
  76.     move.l    %b_Catalog,a0        ;   Close the Catalog, if needed
  77.     move.l    #0,%b_Catalog
  78.     move.l    _LocaleBase,a6
  79.     move.l    a6,d0            ;   Locale.library opened?
  80.     beq    Close%bCatalogEnd    ;   No, skip
  81.     jsr    _LVOCloseCatalog(a6)
  82. Close%bCatalogEnd:
  83.     move.l    (sp)+,a6
  84.     rts
  85.  
  86.  
  87. Get%bString:
  88. *   a0 = pointer to structure (ID, string)
  89.     move.l    a6,-(sp)                ;   Save regs
  90.  
  91.     move.l    (a0)+,d0                ;   Get string number
  92.     move.l    a0,a1            ;   Get default string
  93.  
  94. Get%bString3:
  95.     move.l    _LocaleBase,a6        ;   Locale.library present?
  96.     move.l    a6,d1
  97.     beq    Get%bStringNoLoc    ;   No, skip
  98.     move.l    %b_Catalog,a0        ;   Catalog opened?
  99.     move.l    a0,d1
  100.     beq    Get%bStringNoLoc    ;   No, skip
  101.  
  102.     jsr    _LVOGetCatalogStr(a6)   ;   Call locale.library
  103. Get%bStringEnd:
  104.     move.l    (sp)+,a6
  105.     rts
  106.  
  107. Get%bStringNoLoc:
  108.     move.l    a1,d0
  109.     jmp    Get%bStringEnd
  110.  
  111.     end
  112.